package com.example.demo.threadtest;

/**
 * *  Author:zlf
 * *  2021/3/9 15:10
 **/
public class ThreadZlf extends Thread {

    private String name;

    public ThreadZlf(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(name);
        }
    }


    public static void main(String[] args) {
        ThreadZlf r1 = new ThreadZlf("111");
        ThreadZlf r2 = new ThreadZlf("222");
        r1.start();
        r2.start();

    }




}
